package domain;

import java.util.Collection;
import java.util.HashSet;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;

@Entity
@Access(AccessType.PROPERTY)
public class Administrator extends Actor {
	// Constructors -----------------------------------------------------------

		public Administrator() {
			super();
			
			events=new HashSet<Event>();
			routes=new HashSet<Route>();
		}
		
		// Attributes -------------------------------------------------------------
		
		// Relationships ----------------------------------------------------------
		
		private Collection<Event> events;
		private Collection<Route> routes;
		
		@NotNull
		@OneToMany(mappedBy = "administrator")
		public Collection<Event> getEvents() {
			return events;
		}
		public void setEvents(Collection<Event> events) {
			this.events= events;
		}

		@NotNull
		@OneToMany(mappedBy = "administrator")
		public Collection<Route> getRoutes() {
			return routes;
		}
		public void setRoutes(Collection<Route> routes) {
			this.routes = routes;
		}

}
